#ifndef __TGRXOBJECT_H__
#define __TGRXOBJECT_H__

#if _MSC_VER > 1000
#pragma once
#endif

class TGRxClass;

class TGRX_API TGRxObject
{
public:

	virtual ~TGRxObject();

    static  TGRxClass*			desc();
    static  TGRxObject*			cast(const TGRxObject * pInPtr);
	
    BOOL						isKindOf(const TGRxClass * pClass) const;
    virtual TGRxClass*			isA() const;
	
    virtual TGRxObject*			clone() const;
    virtual TG::ErrorStatus		copyFrom(const TGRxObject* pOther);
    virtual BOOL				isEqualTo(const TGRxObject * pOther) const;

protected:
	
	TGRxObject();
};

#define TGRX_X_CALL(a,b)	b::cast(a->x(b::desc()))

#define TGRX_TGRXOBJECTCLASS	 "TGRxObject"

#endif // __TGRXOBJECT_H__
